home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Borland Visual dBASE Professiona v7.0 / DATA1.CAB / Sample_dBASE / Fleet / Flight.rep < prev    next >
Text File  |  1997-11-20  |  7KB  |  268 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  Flight.rep -- Flight Report
  4. //
  5. //  This report displays the schedule in groups by flight ID.
  6. // 
  7. //  Dependencies: BWA.CRP
  8. //                SCHEDULE.DBF
  9. //                FLIGHT.DBF
  10. //
  11. //  Visual dBASE Samples Group
  12. //
  13. //  $Revision:   1.4  $
  14. //
  15. //  Copyright (c) 1997, Borland International, Inc. 
  16. //  All rights reserved.
  17. //
  18. //---------------------------------------------------------------
  19. SET TALK OFF
  20. ** END HEADER -- do not remove this line
  21. //
  22. // Generated on 10/01/97
  23. //
  24. local r
  25. r = new FLIGHTReport()
  26. r.render()
  27.  
  28. class FLIGHTReport of BWAREPORT from "bwa.crp"
  29.    with (this)
  30.       title = "Schedule by Flight"
  31.       metric = 3
  32.       autoSort = false
  33.       scaleFontBold = false
  34.    endwith
  35.  
  36.  
  37.    this.FLIGHT1 = new QUERY()
  38.    this.FLIGHT1.parent = this
  39.    with (this.FLIGHT1)
  40.       left = 0.5
  41.       top = 0
  42.       database = form.DMCONNECT.ref.dbfleet
  43.       sql = 'SELECT Schedule."Flight ID", Schedule."Flight Date", Flight."From ID", Flight."To ID", Flight.DEPARTS, Flight.ARRIVES, Schedule."Aircraft ID" FROM "flight.dbf" Flight INNER JOIN "schedule.dbf" Schedule ON  (Flight."Flight ID" = Schedule."Flight ID")    ORDER BY schedule."Flight ID", schedule."Flight Date"'
  44.       requestLive = false
  45.       active = true
  46.    endwith
  47.  
  48.  
  49.  
  50.  
  51.    with (this.printer)
  52.       duplex = 1
  53.       orientation = 1
  54.       paperSource = 15
  55.       paperSize = 1
  56.       resolution = 4
  57.       color = 2
  58.       trueTypeFonts = 2
  59.    endwith
  60.  
  61.  
  62.    this.STREAMSOURCE1 = new STREAMSOURCE(this)
  63.  
  64.  
  65.  
  66.    this.STREAMSOURCE1.GROUP1 = new GROUP(this.STREAMSOURCE1)
  67.    with (this.STREAMSOURCE1.GROUP1)
  68.       groupBy = "Flight ID"
  69.    endwith
  70.  
  71.  
  72.    with (this.STREAMSOURCE1.GROUP1.headerBand)
  73.       expandable = false
  74.       height = 0.6
  75.    endwith
  76.  
  77.  
  78.    this.STREAMSOURCE1.GROUP1.headerBand.LABELFLIGHTID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
  79.    with (this.STREAMSOURCE1.GROUP1.headerBand.LABELFLIGHTID)
  80.       height = 0.15
  81.       top = 0.1
  82.       width = 0.6
  83.       metric = 3
  84.       colorNormal = "darkblue"
  85.       fontSize = 9
  86.       text = "<H4>Flight ID:</H4>"
  87.    endwith
  88.  
  89.  
  90.    this.STREAMSOURCE1.GROUP1.headerBand.VALUEFLIGHTID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
  91.    with (this.STREAMSOURCE1.GROUP1.headerBand.VALUEFLIGHTID)
  92.       height = 0.15
  93.       left = 0.7
  94.       top = 0.1
  95.       width = 0.5
  96.       metric = 3
  97.       colorNormal = "darkblue"
  98.       fontSize = 9
  99.       text = {||"<h4> " + this.parent.parent.parent.rowset.fields["Flight ID"].value + "</h4>"}
  100.    endwith
  101.  
  102.  
  103.    this.STREAMSOURCE1.GROUP1.headerBand.TEXTFROMID1 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
  104.    with (this.STREAMSOURCE1.GROUP1.headerBand.TEXTFROMID1)
  105.       height = 0.15
  106.       left = 1.5
  107.       top = 0.1
  108.       width = 1
  109.       metric = 3
  110.       variableHeight = true
  111.       colorNormal = "darkblue"
  112.       fontSize = 9
  113.       text = {||"<h4>" + this.form.form.flight1.rowset.fields["From ID"].value + " to " + this.form.form.flight1.rowset.fields["To ID"].value + "</h4>"}
  114.    endwith
  115.  
  116.  
  117.    this.STREAMSOURCE1.GROUP1.headerBand.TEXTDEPARTS1 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
  118.    with (this.STREAMSOURCE1.GROUP1.headerBand.TEXTDEPARTS1)
  119.       height = 0.15
  120.       top = 0.3
  121.       width = 1.25
  122.       metric = 3
  123.       variableHeight = true
  124.       colorNormal = "darkblue"
  125.       fontSize = 9
  126.       text = {||"<h4>Departs: " + this.form.form.flight1.rowset.fields["DEPARTS"].value + "</h4>"}
  127.    endwith
  128.  
  129.  
  130.    this.STREAMSOURCE1.GROUP1.headerBand.TEXTARRIVES1 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
  131.    with (this.STREAMSOURCE1.GROUP1.headerBand.TEXTARRIVES1)
  132.       height = 0.15
  133.       left = 1.5
  134.       top = 0.3
  135.       width = 1.5
  136.       metric = 3
  137.       variableHeight = true
  138.       colorNormal = "darkblue"
  139.       fontSize = 9
  140.       text = {||"<h4>Arrives: " + this.form.form.flight1.rowset.fields["ARRIVES"].value + "</h4>"}
  141.    endwith
  142.  
  143.  
  144.    with (this.STREAMSOURCE1.GROUP1.footerBand)
  145.       height = 1
  146.    endwith
  147.  
  148.  
  149.  
  150.  
  151.  
  152.    this.STREAMSOURCE1.detailBand.TITLETEXTFLIGHTDATE1 = new TEXT(this.STREAMSOURCE1.detailBand)
  153.    with (this.STREAMSOURCE1.detailBand.TITLETEXTFLIGHTDATE1)
  154.       canRender = {||this.parent.firstOnFrame}
  155.       height = 0.15
  156.       left = 0.25
  157.       width = 1
  158.       metric = 3
  159.       colorNormal = "BtnText"
  160.       alignHorizontal = 1
  161.       suppressIfBlank = true
  162.       fontSize = 9
  163.       fontBold = true
  164.       fontUnderline = true
  165.       text = "Date"
  166.    endwith
  167.  
  168.  
  169.    this.STREAMSOURCE1.detailBand.TEXTFLIGHTDATE1 = new TEXT(this.STREAMSOURCE1.detailBand)
  170.    with (this.STREAMSOURCE1.detailBand.TEXTFLIGHTDATE1)
  171.       height = 0.12
  172.       left = 0.25
  173.       top = 0.2
  174.       width = 1
  175.       metric = 3
  176.       variableHeight = true
  177.       colorNormal = "BtnText"
  178.       alignHorizontal = 1
  179.       fontSize = 9
  180.       text = {||this.form.flight1.rowset.fields["Flight Date"].value}
  181.    endwith
  182.  
  183.  
  184.    this.STREAMSOURCE1.detailBand.TITLETEXTAIRCRAFTID1 = new TEXT(this.STREAMSOURCE1.detailBand)
  185.    with (this.STREAMSOURCE1.detailBand.TITLETEXTAIRCRAFTID1)
  186.       canRender = {||this.parent.firstOnFrame}
  187.       height = 0.15
  188.       left = 1.5
  189.       width = 1
  190.       metric = 3
  191.       colorNormal = "BtnText"
  192.       alignHorizontal = 1
  193.       suppressIfBlank = true
  194.       fontSize = 9
  195.       fontBold = true
  196.       fontUnderline = true
  197.       text = "Aircraft ID"
  198.    endwith
  199.  
  200.  
  201.    this.STREAMSOURCE1.detailBand.VALUEAIRCRAFTID = new TEXT(this.STREAMSOURCE1.detailBand)
  202.    with (this.STREAMSOURCE1.detailBand.VALUEAIRCRAFTID)
  203.       height = 0.12
  204.       left = 1.5
  205.       top = 0.2
  206.       width = 1
  207.       metric = 3
  208.       variableHeight = true
  209.       colorNormal = "BtnText"
  210.       alignHorizontal = 1
  211.       fontSize = 9
  212.       text = {||this.form.flight1.rowset.fields["Aircraft ID"].value}
  213.       borderStyle = 3
  214.    endwith
  215.  
  216.  
  217.  
  218.  
  219.  
  220.    this.PAGETEMPLATE1.TITLE1 = new TEXT(this.PAGETEMPLATE1)
  221.    with (this.PAGETEMPLATE1.TITLE1)
  222.       height = 0.5
  223.       width = 3
  224.       metric = 3
  225.       colorNormal = "darkblue"
  226.       alignVertical = 1
  227.       alignHorizontal = 1
  228.       fontName = "Times New Roman"
  229.       text = "<H1>Schedule by Flight</H1>"
  230.       borderStyle = 6
  231.       form.TITLE1 = form.pagetemplate1.title1
  232.    endwith
  233.  
  234.  
  235.    this.PAGETEMPLATE1.TEXTDATE = new TEXT(this.PAGETEMPLATE1)
  236.    with (this.PAGETEMPLATE1.TEXTDATE)
  237.       height = 0.25
  238.       top = 0.6042
  239.       width = 1
  240.       metric = 3
  241.       colorNormal = "BtnText"
  242.       text = {||Date()}
  243.       form.TEXTDATE = form.pagetemplate1.textdate
  244.    endwith
  245.  
  246.  
  247.    this.PAGETEMPLATE1.TEXTPAGE = new TEXT(this.PAGETEMPLATE1)
  248.    with (this.PAGETEMPLATE1.TEXTPAGE)
  249.       height = 0.25
  250.       left = 2
  251.       top = 0.6042
  252.       width = 0.8021
  253.       metric = 3
  254.       colorNormal = "BtnText"
  255.       alignHorizontal = 2
  256.       text = {||"Page: " + this.parent.parent.reportPage}
  257.       form.TEXTPAGE = form.pagetemplate1.textpage
  258.    endwith
  259.  
  260.  
  261.  
  262.  
  263.    this.firstPageTemplate = this.form.pagetemplate1
  264.    this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
  265.    this.form.pagetemplate1.streamframe1.streamSource = this.form.STREAMSOURCE1
  266.    this.form.STREAMSOURCE1.rowset = this.form.flight1.rowset
  267. endclass
  268.